Computer apparatus and method for integration of process planning optimization and control

ABSTRACT

A system and method, which may be implemented in a plant such as a refinery, are provided for identifying at least one mismatch between operation of at least one process unit and a scheduled target for that process unit. Production values are obtained for each process unit of interest, as are prices and scheduled targets for each process unit. A differential profit value is calculated for each process unit or the set of process units, the differential profit value representing a difference in profit based on the scheduled target and the production value for the profit units. The differential profit value can be indicative of the mismatch. Remedial action can then be taken to alter a scheduled constraint of one or more process units, or an operational constraint of one or more process units.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application claims priority to U.S. patent application Ser. No. 13/817,048 filed 14 Feb. 2013, which is a national stage entry of PCT/CA2011/050503 filed 17 Aug. 2011, which claims priority to U.S. Provisional Application No. 61/374,877 filed 18 Aug. 2010, the entireties of which are incorporated herein by reference.

BACKGROUND

1. Technical Field

The present application relates generally to computer-implemented monitoring and control of refinery activities.

2. Description of the Related Art

Oil refining is a complex and valuable process. Since the introduction of computers into operating refineries, a goal has been to integrate the decision making of management with automatic actuation by control systems. For many years, refiners have been developing computer programs to optimize the operation of oil refineries. This computer-based optimization activity can be divided into three types of solutions: planning and scheduling, multivariable constraint control (MVCC), and real-time modelling and unit optimization of various refinery operating units. To date, however, each of these types of solutions has inherent limitations or deficiencies that have inhibited the development of a satisfactory integrated solution.

A first type of solution is the use of a refinery planning and scheduling model, which has been implemented by many refineries. Refineries must plan their operations weeks and months in advance in order satisfy the long lead times required for purchase of crude oil supply and contracts for product delivery. This is done in part by solving a linear or non-linear programming model which generally uses a multi-period, steady-state, regression based model of the entire refinery operation to calculate a refinery optimum operation plan weeks and months into the future. The refinery planning and scheduling model is usually used in two modes. In planning mode the model is solved using a linear or non-linear programming algorithm and is usually run bi-weekly or monthly. Its main purpose is to determine the best average operating conditions for the planning period, typically the next two to four weeks, for each of the refinery units in order to assure satisfaction of required product properties such as the octane number of the gasoline produced and volumes of products to be produced during the planning period. The solution of the planning model provides for the optimal operating solution for the average conditions of the planning period. In scheduling mode the same model is run as a short term simulation of the refinery, typically once weekly and predicting daily operations out into the future. The purpose of the scheduling solution is to insure the satisfaction of inventory constraints on storage tanks used to hold crude oil feed, intermediate streams, and the final products that are ultimately shipped by pipeline or in batches on boats, trucks and railcars.

A weakness of this planning and scheduling model is that it is a crude representation of the operation of the entire refinery, which is a complex set of chemical processes. Another is that the planning and scheduling model and its input data require manual update because the input data is not directly measurable in the process. The model in this solution represents an average of the period being modelled; so, for example, it cannot distinguish between daytime and nighttime operation when changes in ambient temperature can have a dramatic impact on the optimum operating point of the refinery. The inability to match the planning model to the current behavior of the process and the modelling of only average behavior often results in a planning model that significantly deviates from the actual refinery behavior. The planning model therefore requires specific know-how from the users of the model to adjust the solution so that it is achievable by the refinery operators. While planning and scheduling software has been developed to make the manual manipulation of the planning solutions easier than in the past, the planning and scheduling model's limitations are a cause of poor integration with actual operational decisions in the refinery.

A second solution used in refinery optimization that has received wide attention and implementation is multivariable constraint control (MVCC). Multivariable regression models, which include pricing constraints, are derived from process data that is generated by conducting experiments on individual process units, such as the fluid catalytic cracking unit (FCCU). The models are solved using linear, but sometimes non-linear, optimizers to arrive at control parameters that are applied by controllers to each of the individual process units. Recent advances in MVCC model identification have made these regression models very reliable and easily derivable even under closed-loop operation of the individual process units. The objective function pricing values are often supplied by the previously mentioned refinery planning and scheduling optimization. A weakness of these MVCC controllers is the nature of the model. Because it is derived from regression of operating data, there is some reduction in fidelity of the model to actual operation; and the optimization of the MVCC model will not reliably extrapolate a solution outside of its experience since the model is derived from operating data.

Accordingly, refiners have attempted to implement a third type of optimization, unit optimization, in their refineries in the form of first-principles models of the refinery operating units such as Crude and Vacuum Distillation, fluid catalytic cracking (FCC) and Hydrocracking in order to calculate an accurate optimum for each individual process unit. These optimization models consist of detailed models based on first principles of chemistry and physics of reaction kinetics, tray by tray distillation, valves, heat exchangers and all of the process equipment in the process unit. In addition, the stream flows are disaggregated into very detailed representation of the molecules and compounds that are constituents of crude oil and its product streams, even though few of these components can be directly measured in the process streams. The resulting models are very large and complex sometimes consisting of as many as 60,000 equations for a single process operating unit.

In this configuration these unit optimizations sit in a hierarchy below the refinery planning and scheduling model and above the process unit MVCCs. The purpose of these optimizers is to overcome a lack of fidelity in the MVCC models. While these types of unit optimizers have reportedly been successfully implemented with initial reports of high profit, only a small number of refining companies have attempted to implement these optimizers due to the complexity of the models and the intensive effort of highly skilled engineers required to implement them. Even then, due to the complexity and difficulty of maintaining the models and their optimization, refineries have abandoned this solution and returned to the use of planning optimization and the MVCC solution for refinery optimization. A further reported problem is that the increased profits in using complex unit optimizers of this type over the above-mentioned solutions can only be measured when unit optimization was initiated; after a period of operation, it becomes difficult to determine how much additional profit was being realized by this solution without actually turning off unit optimization and returning to the basic combination of planning optimization and MVCC controllers. This problem is due to shifts in the operational baseline resulting from changes in the mix of crude oils being processed, and changes in the products and product distribution goals of the refinery.

Another deficiency in these unit optimizations is that they fail to capitalize on the opportunity to optimize inter-unit interaction. Because planning and scheduling optimization, in part, attempts to optimize inter-unit interactions, some refiners have attempted to link unit optimizations with each other to try to achieve refinery-wide optimization with the aforementioned first-principles models. However, these implementations are much larger, involving hundreds of thousands of equations, and are more complex and more difficult to maintain than a single unit optimization.

There have been attempts to link MVCCs together by a coordinating linear program that receives its pricing from the planning optimization and integrates the operation of the MVCCs. One failing of this approach is in the limitations of the linear model of highly non-linear reaction processes such as the FCC. In a variation on this approach users have attempted to operate closed form kinetic models of such non-linear reaction processes on-line and calculate numeric derivatives of these models, which are then passed to the coordinating linear program in order to allow it to approximate the non-linear process behavior. A deficiency in this approach is that the closed form kinetic models are difficult to automatically match to current reaction process conditions. Another is that the derivatives computed for these models are calculated by sequentially perturbing each input and solving the model, which is a tedious and computationally burdensome process. Further, in order to ensure convergence of the kinetic models, the user must set wide convergence criteria, which may result in unreliable and noisy derivatives that change significantly from solution interval to solution interval. In practice, these noisy derivatives are not implemented and this solution reverts to be a fixed linear program coordinating MVCCs, resulting in the loss of the benefit of having a first principles model while introducing significant complexity in the implementation.

Moreover, even with various attempts at optimizing and integrating processes, in practice various incompatibilities between the objectives of planning and scheduling and those of plant control still presents a challenge. The planning and scheduling priority, typically, is to ensure that future volumes of feed and product that have been committed to under contract (a factor external to actual plant conditions) are consumed and produced while also achieving the required product qualities (determined according to factors internal to the plant). On the other hand, the process control priority of the MVCCs may be to meet product quality specifications rather than the necessary product volumes. Another challenge in accomplishing integration is that each of the steps in long term planning of refinery operation, short term scheduling of refinery operation, and control and operation of the refinery are each in themselves complex endeavors involving teams of numerous people focused on accomplishing the goals and objectives of each of their assigned functions of planning, scheduling, operation and control of the refinery. The level of complexity and effort in each activity complicates the ability of the different departments to communicate compatible objectives and constraints on meeting those objectives to each other. Further, these specialized needs of these departments are satisfied using different types of models of the process that are specifically purposed to support the specific planning, scheduling and control functions. As noted above, planning and scheduling models are typically steady-state regression models; these are often regressed from data generated by perturbing a first-principles engineering model of the individual processes. The process control models in the MVCCs, on the other hand, are typically dynamic regression models developed by regression of data generated by perturbing the actual process around a particular operating point. Also as noted above, the update cycles for running these models typically do not line up.

As a result of the practical mismatches in optimization models, frequencies with which they are run, and objectives, there are often mismatches in the targets and constraints of the two types of optimization. As part of the monthly planning cycle, planners often conduct a plan versus actual reconciliation in which a plan set at the beginning of the previous cycle is compared to the actual achieved performance in that cycle. After accounting for unplanned interruption of operations, delayed start-ups, and other unplanned events, under typical industry conditions there can be at least one dollar ($1) per barrel of feed in unaccounted profit loss from that forecast by the planner. A significant portion of that loss can be due to the mismatched targets and constraints of the planning and scheduling models and the operational targets and constraints of the MVCCs. In North America alone, currently approximately twenty million barrels of crude oil are processed in refineries every day. The amount of profit loss available for recapture can thus be considered significant; in addition, recapturing this loss would assist in reducing waste output since more crude oil could then be converted to higher value transportation fuels.

In some instances there may be more than one identified source of profit loss that may require significant re-work by some or all of the planning, scheduling, operations and control departments. Calculation of the profit loss associated with each of the sources of mismatch between planning and control targets and constraints allows for prioritization of effort to correct the loss.

BRIEF DESCRIPTION OF THE DRAWINGS

In drawings which illustrate by way of example only embodiments of the present application,

FIG. 1 is a flow diagram of an example crude oil refinery.

FIG. 2 is a flow diagram illustrating a hierarchical structure of a refinery optimization system including a multi-unit, real-time optimization module.

FIG. 2A is a table illustrating examples of components that may be processed by the various units in the refinery optimization system of FIG. 1.

FIG. 3 is a schematic diagram illustrating the multi-unit, real-time optimization module of FIG. 2.

FIG. 4 is a simplified flow diagram of an example Fluid Catalytic Cracking Unit showing the reactor, regenerator and distillation columns.

FIG. 5 is an illustration of a kinetic model for an example Fluid Catalytic Cracking Unit reactor.

FIG. 6 is a simplified flow diagram of an example Naphtha Circuit in the example refinery of FIG. 1.

FIG. 7 is a schematic diagram illustrating a process for profit calculation and mismatch identification.

FIG. 8 is an illustration of an example in accordance with the process of FIG. 7.

FIG. 9 is a further illustration of an example in accordance with the process of FIG. 7.

DETAILED DESCRIPTION

The embodiments described herein provide a solution directed to the foregoing problems in the integration of planning, scheduling, and process control. Mismatches between targets and constraint limits for product volumes and qualities in the planning and scheduling optimization and the targets and constraint limits in MVCC optimization are computed and indicated for subsequent adjustment and control of operations. Accordingly, a means is provided for closing the gap between planned profit and actual operating profit of a process which is scheduled using a single-period or multi-period, steady-state planning model and optimization program. The planning model and optimization program can be based on a linear programming or non-linear programming model, and further can be controlled on-line by means of linear or non-linear multivariable constraint controls. A current state of the plant operations, such as the current economic state determined using current operating conditions, is compared with a planned optimum state, such as the planned economic optimum computed by the process planning optimization, itself based on forecasted production rates and product qualities. Differences between the actual and planned states—such as the actual and planned profits—are computed and the sources of those differences are identified, thus providing means for aligning the targets of planning optimization and process control. Subject to process operation permission, MVCC constraint limits can be changed to meet constraint limits in the planning optimization; alternatively or in addition, subject to planning permission, the planning constraint limits can be changed to meet MVCC constraint limits.

In addition, embodiments described herein provide a solution to problems in multi-unit optimization of a refinery or a similar process, such as an ethylene production process in which naphtha or ethane is cracked in thermal cracking reactors to produce ethylene, propylene and other chemicals which are then separated in a distillation train, using steady-state models based on first principles of physics and chemistry. In particular, a computer apparatus and method is provided to calculate a refinery operating optimum which integrates with presently available refinery planning and scheduling optimizers and process unit MVCCs. First principles, rigorous, kinetic models are employed for refinery reaction processes such as FCC, Hydrocracker, and gasoline Reformer. Gain-only models derived from regression of process data are used for all other processes within the refinery operation that are linear or behave linearly in the permissible operating space, such as distillation. The derivation of the kinetic models and gain-only models are within the abilities of the person of ordinary skill in the art. For example, the gain-only models may be the same as those used for MVCC models.

FIG. 1 is a flow diagram of a set of key process units in an example refinery to which these embodiments may be applied. FIG. 1 is representative of a typical refinery, in which crude distillation column 1 provides input to a hydrocracker process unit 3, for example in the form of atmospheric gas oil (AGO). Other fractions extracted by the crude distillation process such as light and heavy naphtha, kerosene and diesel may be delivered to other units within the refinery. Heavy naphtha, for example, can be input to a reformer unit 6. Residue from the crude distillation process is input to a vacuum distillation process unit 3, which in turn provides input to downstream processes in the refinery. For example, heavy vacuum gas oil (HVGO) and light vacuum gas oil (LVGO) output from the vacuum distillation process unit 3 are input to the downstream hydrocracker process unit 3 and the FCCU 4, respectively.

The hydrocracker unit outputs naphtha, jet and diesel fuels, which in turn are input to downstream units; in this example, the hydrocracker naphtha is input to the reformer unit 6. The FCCU 4 output includes propane and butane, which are input to an alkylation unit 5, gasoline, and light cycle oil. The various outputs from the crude distillation unit 1 and the downstream hydrocracker unit 3, FCCU 4, alkylation unit 5 and reformer 6 are delivered to various gasoline, jet/kerosene and distillate pools 7, 8, 9 respectively for storage. For example, crude distillation output light naphtha and the reformate output from the reformer 6 as well as the alkylate output from the alkylation unit 5 and the gasoline output from the FCCU 4 are delivered to the gasoline pool 7, while the crude distillation output kerosene and hydrocracker output jet fuel are delivered to the jet/kerosene pool 8 and the crude distillation output diesel, hydrocracker output diesel, and light cycle oil are delivered to the distillate pool 9. The components of the various unit models are shown in FIG. 2A.

It will be appreciated by those skilled in the art that the flow diagram of FIG. 1 is representative only of select process units and components of the notional refinery. There are of course processes, other units and components that of the refinery that are not illustrated for ease of reference, such as hydrotreating reactors for removing sulfur from some product streams, tanks, pumps, valves and so forth. It will also be appreciated that the various components that are illustrated in FIG. 1 typically include further components; for example, each of the hydrocracker 3, FCCU 4, alkylation unit 5 and reformer unit 6 are provided with distillation columns and/or other components that will be modelled as explained below. While FIG. 1 is representative of a typical refinery, the individual process units shown can be replicated within a physical plant; for example, there can be two or more crude and vacuum units 1, 2 that can be operated independently. Also, there can be additional process units, such as a delayed coker, that may be used depending on the type of crude oil being processed. Such variations in process units will simply involve a modification to the real-time model of the process described herein which, given the teachings of this specification, will be within the ability of the person of ordinary skill in the art.

Turning first to multi-unit optimization, FIG. 2 shows the hierarchical structure of an optimization system to be employed within a refinery such as that illustrated in FIG. 1. A multi-unit, real-time optimization module 12 is advantageously disposed between a planning and scheduling linear programmer or optimizer 10 and MVCC controllers 13 controlling the various process units described with reference to FIG. 1. The optimization module 12 can include a non-linear optimizer employing a software non-linear programming solver such as such as MINOS, available from Stanford Business Software, Inc., Palo Alto, Calif. 94306-0398 or software implementing sequential quadratic programming (SQP), or other commercially available non-linear optimization software. The optimization module 12 engages in solving for an optimization of a process model for all of the refinery processes, or a selected subset of processes, on a periodic basis, for example hourly or at least several times per day. The process model solved is posed in the form of an open-equation problem representing a steady-state model of the refinery's processes using non-linear kinetic models of reaction processes in the plant and linear models of any other processes, in which all equations are solved simultaneously. The purpose of this formulation is so that in the solution sequence generated by the optimization module 12 can be reconciled against steady-state process operating data by solving a constrained quadratic optimization problem to optimally match the model against the current operating state of the refinery, followed by a solution of the same open-equation model using a priced objective function to seek the improved, optimum operating point in face of process variability and change. Advantageously, derivatives of the equations with respect to the solution variables are expressed analytically so that the problem of noisy derivatives is disposed of.

The optimization module 12 receives pricing data for each stream from the planning and scheduling optimizer 10, and sensor-measured variables from the refinery processes, and sends targets and constraint limits computed by its optimization solution directly to the MVCCs 13. The optimization module 12 includes modules to check pricing data for reasonableness, and can be configured to alert a human operator in the event the pricing is not reasonable, so that the operator can optionally run off-line cases to study the effect of the new pricing before implementing it online. The sensor-measured variables can include stream flows, stream 90% boiling points, percentage content of pure components, stream temperatures, and reactor temperatures. The sensor data may be received substantially continuously or only periodically (for example hourly). In some embodiments, the input values to the optimization solution, including stream 90% boiling points, percent content of a pure component, or road and motor octane number, may be inferred from raw data. The input values may also be determined from laboratory-measured variables, for example as in the case of octane number.

FIG. 3 shows more detail of the components of the multi-unit, real-time optimization module 12. The unit provides a multi-unit real time optimization process beginning with a scheduling module 21, which the user may set to operate on a periodic schedule such as once per hour, for example. The scheduling module 21 initiates a test process module 22 that receives process measurements for each of the process units (e.g., selected from those of FIG. 1) accounted for in the optimization process and operates to determine whether or not each of the processes is in a steady state.

The test process module 22 examines selected process measurements for each process unit which are inputs to the test function of the test process module 22. A first test implemented by the module 22 is to determine if the process measurement values detected by sensors at the refinery process unit are valid. The sensors typically detect and record periodic measurements from the process unit, for example once every minute. For example, one validity test is for change from measurement values read during a last scheduled test. If the values have not changed for some time the sensor used to determine the process measurements is presumed to have failed and the measurement is deemed to be bad or invalid. If this is the case, the process measurement value is re-tested at a later time (for example, after the sensor problem is corrected) by the test process module 22.

Once the values have been determined to be valid, the set of valid values is tested to determine if the corresponding process unit is in a steady state or not. The steady-state test can be to determine whether or not the standard deviation of the last hour of one minute values of a particular measurement detected by the process unit sensor is less than a specified maximum amount. This test can be applied to a group of selected process variables used to define the operation of the process unit. If the tests conducted at the test process module 22 are satisfied, the next step is to reconcile the process model to be optimized against the set of validated current process measurements by the reconciliation optimization module 23.

Reconciliation of plant data is preferred because there is always sufficient error in process measurements so that material and energy balances will not close 100%. However, in order for a valid optimization solution to be calculated the problem should start at a mathematically balanced starting point. The reconciliation optimization module 23 operates on a set of model equations representing a model of the plant and its process units, a portion of which is shown in FIG. 5. Development of model equations will be known to those skilled in the art. The reconciliation optimization module 23 subjects the model equations to the reconciliation objective function:

min F=Σ _(i) Wt _(i)(Meas _(i)−Model_(i))²

where for each measured value i, Meas is a plant measurement value or the measured input, Model is a model-calculated value or estimated value corresponding to the plant measurement, Wt is a weighting factor or penalty function on the error (i.e., the difference between Meas and Model, squared). The values of Wt are set based on the known reliability of the measurements, Meas. For example, the variables identified as invalid in the validity test have Wt=0, while those that are considered highly reliable such as temperatures have much larger penalties. The sum of the weighted errors is taken over all measured values.

Once the reconciliation is completed the values of the reconciled variables output by the reconciliation optimization module 23 become the input variables for the real-time economic optimization module 25. The real-time economic (or profit) optimization module 25 carries out an economic optimization of the same model equations used by the reconciliation optimization module 23, but now subject to the economic optimization function:

${\max \; F} = {\sum\limits_{i}{\left( {{Model}_{i} - {Target}_{i}} \right)\left\lbrack {{Cost}_{i} + {\sum\limits_{j}{Q\; {{cost}_{j}\left( {{Q\; {model}_{j}} - {Q\; {target}_{j}}} \right)}}}} \right\rbrack}}$

where Model_(i) is each reconciled process variable value from the reconciliation optimization module 23; Target_(i) can be an externally-set target or constraint corresponding to the variable (e.g., stream 90% boiling points, percent content, octane number, stream and/or reactor temperature, production stream volume, or production stream quality), and is calculated by the planning and scheduling optimization unit 10; Cost_(i) is a price per unit of the target as determined by the planning and scheduling optimization unit 10; Qmodel_(j) is a set of process variable qualities calculated in the model, a special subset of Model_(i); Qmodel_(j) values are optimized against Qtarget_(j), which are quality targets for the various stream flows for each of the process units, and are also calculated and provided by the planning and scheduling optimization module 10. Qcost_(j) is the price per unit corresponding to Qtarget_(j), and is also provided by the planning and scheduling optimization module 10. The resultant optimized variables from the economic optimization function solution are then provided as operating target or constraint values to each of the corresponding MVCCs.

Cost_(i) and Qcost_(j) are preferably the last set of valid prices provided by the refinery planning and scheduling optimization module 10. When the refinery planning optimization is run by the module 10 (typically, once every two to four weeks) a new set of prices are generated for feed, intermediate streams and products and provided to a price validity checker module 24 before the prices are provided to the real-time economic optimization module 25. The price validity checker module 24 can alert the operator to significant changes in pricing compared to historical data maintained for the checker module 24, or of prices outside of a range of acceptability. While prices determined to be valid by the checker module 24 may be automatically provided as input to the real-time economic optimization module 24, operator intervention may be required to pass the new prices to the economic optimization module 24 regardless of the results of the validity test.

The output from the economic optimization module 25 and output from the planning and scheduling module 10 are provided as input to a profit calculation module 26, which compares the expected profit that would be achieved if a prior art refinery planning solution were implemented compared to the expected profit achieved by implementing the solution provided by the economic optimization module 25 using the profit calculation:

Profit=Σ{(F−F _(LP))└$_(LP) ^(F)+$_(LP) ^(P)(P−P _(LP))┘}

where the variables F are a special subset of variables Model_(i), namely, the optimized product flow rates (e.g., measured in barrels per day, or BPD), and P are a special subset of the variables Qmodel_(i), namely the optimized product stream qualities. F and P are obtained from the economic optimization module 24. The variables F_(LP) and Q_(LP) are the product flow and quality targets that the planning and scheduling optimization unit 10 would have passed to the corresponding MVCC without the intervention of the real-time optimization module 12. The variables $^(F) _(LP) and $^(Q) _(LP) are pricing of product flows and quality, respectively, as provided by the planning and scheduling optimization unit 10. The profit calculation thus provides an estimate of the profit achieved by the real-time optimization module 12 over the profit that would have been achieved if the planning optimization unit 10's solution had been implemented by the MVCCs. It should be recognized that this profit calculation is likely a conservative estimate of the actual profit because in the current state of the art the scheduling and planning solution-MVCC implementation requires significant manual intervention in order to provide the correct targets to the MVC—meaning that even if accurate, there may be a delay before the targets computed by the scheduling and planning optimization module 12 are implemented at the MVCCs, whereas the profit calculated by the profit calculation module 26 is an actual result that can be achieved.

FIG. 4 is a flow diagram of an example FCCU, showing the reactor 41, catalyst regenerator 42, main fractionators 43, and light ends distillation columns 44. FIG. 5 shows a representation of the steady-state kinetic model of the reactor. The steady-state process model, also illustrated in FIG. 5, provides a significant increase in fidelity over the regression model typically used in the planning optimization while also providing a substantial reduction in complexity from first-principles unit optimization models that have been used to date in real-time unit optimization applications. The reduction in model complexity relative to current state of the art real-time optimization models results from: 1) modeling primarily the material balance behavior of the reaction processes; 2) incorporating the gain only elements of the regressed linear MVCCs in the model; 3) using available kinetic models of the catalytic reaction processes; and 4) using the same stream components as those used in the planning optimization. The complexity of the model employed by the real-time optimization module 12 is substantially less than first-principles unit optimizers of the past due to the reliance on the MVCCs to handle all energy balance and mechanical constraints and use of the planning model stream components. The model used in the real-time optimization module 12 focuses only on material balance and kinetic model relationships for conversion of components in reaction processes.

Thus, with reference to the simplified flowsheet of a sample refinery shown in FIG. 1, the real-time optimization module 12 solves in real time how to achieve the optimal mix of products given the pricing and long term production goals provided by the planning and scheduling optimization unit 10, while satisfying operating constraints on the units within its scope. As an example, the real-time optimization module 12 will try to achieve the production of octane barrels of gasoline in the blending mix by optimally balancing the production of octane barrels from the Reformer 6, FCCU 4, and Alkylation Unit 5. In the FCCU 4, for example, this will involve calculation of the desired gas oil feed rate, feed temperature and reaction temperature while in the Reformer 6 the feed rate and bed temperatures are the main variables to be calculated. This will simultaneously involve calculating the optimal operating targets for the Crude and Vacuum Distillation unit 2 since it is the source of the feeds to the downstream reaction units. The calculated operating targets are then implemented by the MVCCs 13 in FIG. 2.

In addition to improved model fidelity a key advantage of the real-time optimization module 12 over the operating plan calculated by the planning and scheduling optimization unit 10 is that the optimization module 12 can exploit real-time change of refinery conditions such as diurnal change, variation in crude blend, and change in operating performance of the units while the planning optimization module 12 can only work on averages. A simple example of the benefits of the real-time optimization module 12 is that in a refinery which is constrained by heat removal capacity the optimal time to push production is at night and unlike the MVCCs, the real-time optimization module 12 can be used to optimally re-distribute the production of octane barrels between the various units.

Turning next to integration of planning, scheduling, and process control, it has been discovered that concepts discussed above may also be applied to the problem of identifying mismatches between the targets and constraints set for planning and scheduling optimization, and those of MVCC optimization. An example is provided in the context of what may be considered a subprocess within the refinery's overall process, in this case a naphtha circuit in an oil refinery, a simplified example flow diagram for which is illustrated in FIG. 6. FIG. 6 depicts key process units that can participate in a profit meter calculation in the naphtha circuit, which commences with one or more crude distillation columns 61, 62 and terminates in a gasoline pool 70. Kerosene from the distillation columns can be fed to a kerosene hydro-desulfurizer (HDS) 63. Kerosene and Diesel oil output from distillation can also be input to a diesel hydro-treater (DHT) 64, which produces ultra-low sulphur diesel (ULSD). Output naphtha from the distillation processes is fed to a naphtha splitter or naphtha distillation column 65; the naphtha distillation column 65 produces heavy and light naphtha. The former is fed to a reformer 66 which outputs hydrogen, liquefied petroleum gas (LPG) and reformate. The reformate is input for the pre-fractionation distillation column 68, which prepares feed for the BTX unit 69. The overhead and bottoms streams, PF Ovhd and PF Btms, from the pre-fractionation column go to the gasoline pool 70 as blending components. The BTX unit 69 produces benzene, toluene, and xylene for chemical sales; Raffinate, which consists of non-aromatic species, and C9+, which consists of species with molecular weight greater than xylene, both go to the gasoline pool 70 as gasoline blending components. Reformate production which exceeds BTX unit 69 capacity goes to the gasoline pool 70 as a blending component. Further, a hydrocracker main fractionator (HYC) 67 produces heavy naphtha which is fed to the reformer 66 and light naphtha which goes to the gasoline pool 70 as a gasoline blending component.

Again, it will be appreciated by those skilled in the art that the flow diagram of FIG. 6 is representative only of an example set of process units and components of a notional naphtha circuit, and that various elements that may be present are not illustrated for ease of reference in this example. For instance, there may be only one crude distillation unit 61; further, there may be alternative process units, such as a sulfolane unit, depending on the type of crude oil being processed. Those skilled in the art will understand that variations in process equipment will simply involve a modification to the models discussed herein, and that these do not affect the relevance of the embodiments described herein to the possible process flows that may be implemented. Indeed, these embodiments may apply to an entire refinery such as that of FIG. 1, and not merely to a circuit or subset of processes within a refinery.

FIG. 7 illustrates steps, within block 80, for profit calculation and subsequent identification of differences between actual and planned states of the refinery or portion thereof. The operation can be initiated at block 81 by a scheduling module, which initiates the method on a periodic basis (for example, every hour). A set of user-specified process variables is provided for products produced by one or more process units in the refinery, for example for an entire refinery process or for a particular subprocess or circuit of interest, and production values for these variables are read in at block 82 to a test process module. Production values may be expressed as volumes or, more typically, by flow rate (e.g. barrels per day, or BPD). The values may be retrieved from a refinery process historian system (not shown). Examples of select variables, which in this example may refer to products in the naphtha circuit described above, are illustrated in Table 1 below:

TABLE 1 Process Variable Plant Measurement LSR 22FC040.PV LHC 32FI022.PV PF Ovhd 24FC007.PV Raffinate 24FI024.PV C9+ 24FI003.PV Reformate to Gasoline 23FC013.PV Reformate Octane 23CA002_1B.PV Benzene 24FC040.PV Toluene 24FI045.PV Xylenes 24FC101.PV Jet 11FI108.PV ULSD 21FC048B.PV

The values obtained for these variables are tested for validity at block 82 according to user specified limits by a test process module. If a value is determined to be invalid, then the method returns to block 81 to await the next cycle. If all values are determined to be valid, they may then be tested by the test process module at block 83 to determine if the corresponding process unit is in a steady state according to user-specified limits at block 84, also as described above. If a unit is not in a steady state, then again the method returns to block 81. Otherwise, the process measurements are deemed to be suitable for use in a profit calculation at block 86.

In the meantime, on the planning side, a scheduler may periodically issue via a schedule module a new set of planning prices and scheduled production variable targets for a refinery in accordance with the planning and scheduling model. The model may include target and constraint values for the various units in the refinery, as may be determined from the linear or non-linear programming model mentioned above. An example of production targets and prices that may be produced by the scheduler is provided in Table 2. In Table 2, values which are taken from a planning solution are denoted by the syntax <LP> <Table Name> <Item Name>, where <LP> indicates that in this example, the source of the value was from a linear programming planning model; values which are taken from a scheduling solution are denoted by the syntax <Schedule> <Item Name>:

TABLE 2 Process Variable Scheduler's Target Value Planning Price Gasoline Pool <LP> <SALES> <E87> Gasoline Pool <LP> <BLENDS> <P-ON> Octane LSR <Schedule> <LSR> LSR Octane <LP> <LSR> <RON> LHC <Schedule> <LHC> LHC Octane <LP> <LHC> <RON> PF Ovhd <Schedule> <PFOH> OF Ovhd Octane <LP> <PFOH> <RON> Raffinate <Schedule> <Raffinate> Raffinate Octane <LP> <RAFF> <RON> C9+ <Schedule> <C9 Plus> C9+ Octane <LP> <C9+> <RON> Reformate to <Schedule> <Reformate> Gasoline Reformate Octane <LP> <REFT> <RON> Benzene <Schedule> <Benzene> <LP> <SALES> <BNZ> Toluene <Schedule> <Toluene> <LP> <SALES> <TOL> Xylenes <Schedule> <Xylene> <LP> <SALES> <XYL> Jet <Schedule> <HDS Kero> <LP> <SALES> <JET> ULSD <Schedule> <ULSD> <LP> <SALES> <ULSD>

A validity test can also be run on these values using a set of user specified limits at block 84, for instance to determine the validity of the planning prices within a specified range. If the target production and price values are determined to be valid, the prices, targets and associated constraints for the process or subprocess of interest are published at block 85. While the publication of this data may occur on a periodic basis, this is not necessarily coincident with the initiation of the method by the scheduling module at block 81; as noted above, the planning model may be run monthly, while the scheduling model may be run weekly, whereas the method of block 80 may be executed hourly, although either of these periods may be adjusted. Regardless, whenever the method is executed, the last valid set of prices, targets and constraints published by the scheduler may be used.

The prices, targets and constraints determined by planning and scheduling and published at block 85, and the production volumes obtained from refinery data and tested at blocks 82 and 83, are then used as input to a profit calculation module at block 86. In this embodiment, the profit calculation module operates on the user-specified variables for which production values were obtained in block 82 and calculates a differential profit value. The differential profit value is a comparison of the profit that would be achieved if the planned production target had been met with the actual profit realized by the actual refinery process or subprocess. The calculation may be expressed as:

Profit=Σ{Flow_(Plant)└$_(LP) ^(F)+$_(LP) ^(P)(Quality_(Plant)−Quality_(Sched))┘−Flow_(Sched)×$_(LP) ^(F)}

where Flow_(Plant) is the measured product flow (e.g. in BPD) based on refinery data; Flow_(Sched) is the scheduled value for the product flow; Quality_(Plant) is a measured product property; Quality_(Sched) is the scheduled value for that product property; $^(F) _(LP) is the price for the product (e.g. in dollars per barrel) as provided by planning and scheduling; and $^(P) _(LP) is the price for the product property, also as provided by planning and scheduling. Input to each unit (feeds) are assigned negative price values, as they constitute a cost of production; output (product) is assigned a positive value. In addition, cost of any significant energy consumption during the operation of the process or subprocess of interest (e.g. furnace fuels) may be added to the summation. Alternate formulations of this profit equation expressing the profit difference between scheduled production and actual performance may be derived by those skilled in the art. A non-zero result in this profit calculation is indicative of a mismatch between the targets and constraints set for planning and scheduling versus operational targets and constraints; in a typical refinery scenario, the result is often expected to be negative.

Thus, in the example of FIG. 6 and Tables 1 and 2, the profit calculation module would calculate the overall profit for the naphtha circuit using the product flows obtained for some or all of the product variables listed in Table 1, and corresponding target and pricing values for the corresponding products of Table 2. However, the profit calculation can be applied to a single process unit, or summed over a set of units (e.g., a circuit), or to the entire refinery process. The profit may be computed according to the above equation for each constituent part of the process or subprocess of interest (i.e., each individual process unit) on each cycle of block 80, and stored for later display by a display unit, and analysis. For instance, the hourly (or other periodic) data computed by the profit calculation module at block 86 for each unit can be stored in a spreadsheet or database for subsequent analysis and rendering in a report. This historical set of differential profit values can be displayed in whole or in part to provide a visual indication of a mismatch—or several mismatches—between the operation of the process unit or units and the scheduled target for the same unit or units.

At block 87, a profit-loss rationalization is undertaken, for example by a rationalization module, to determine whether or not any mismatch detected between planning and operation is significant enough to require action, and if action is required to eliminate or reduce the mismatch, whether a change is to be made to the planning and scheduling targets and constraints or to the MVCC targets and constraints. Identification of a significant mismatch may be carried out by comparing the calculated profit difference to a corresponding predefined tolerance limit to determine whether it exceeds the limit. Identification can also be carried out by a visual analysis of plotted historical differential profit values. Furthermore, the source of the mismatch between the targets and constraints may be identified according to the granularity of the profit differences calculated at block 86: if profit differences are calculated and recorded for each individual unit within a refinery process or subprocess, the source or sources of the mismatch may be more readily located by identifying those process units producing a greater than expected profit differential.

Once the changes to the planning and scheduling or MVCC targets and constraints have been identified, new targets and constraints for planning and scheduling, or for the MVCCs, as the case may be, are published at block 88. Accordingly, the impact of targets and constraints set for both planning and scheduling models and for MVCCs can be more readily detected, facilitating the improvement of both through remedial alterations made to the targets or constraints of one or the other, or both (subject to permission), resulting in improved integration of the planning, scheduling and control functions.

Example 1

FIG. 8 depicts is a graph showing, initially, two months (January and February) of operating data for the Crude 2 naphtha cutpoint (in degrees Fahrenheit) from the example of FIG. 6. During this period, FIG. 8 shows that the planning target for both months was 311° F. (LP Planning Target value). The plotted data shows hourly average maxima and minima for the variable from real-time data, and it is evident from the data that the naphtha cutpoint was held against a lower limit value (MVCC lower constraint limit) by the MVCC operating the crude unit, which is consistent with the planning target.

FIG. 9 compares the data of FIG. 8 to subsequent data from operations over the summer months from July to September. After the earlier time period, the scheduler published new targets and constraints calling for a reduction of the naphtha cutpoint target to 302° F. (New LP Planning Target); however, the plant operators never changed the MVCC targets in response to the planning change. In this scenario, the failure to change the operating targets is determined to have resulted in a differential of $0.08/Barrel of crude processed, as computed by the profit calculation module. So, in the event that the problem lies in the communication from planning and scheduling to the operation department, the solution would be to change the constraint limits on the MVCC to match those provided by planning. However, another possibility is that the operators were informed but were not able to modify the naphtha cutpoint limits due to operating constraints in the plant unknown to the planners and schedulers.

In this particular example the latter was in fact the case and the problem was that the operators did not have a means of communicating the plant operating constraint that prevented lowering the naphtha cutpoint target back to the planners. By supervising the calculations generated according to the embodiments described above, it becomes possible to discern this issue; then the planners and schedulers could re-run their planning and scheduling cases to determine if there is a sufficient incentive to incorporate the new information in the operating plan. The average North American refinery processes approximately 200,000 Barrels of crude oil per day which, at $0.08/Barrel, in this case works out to $16,000/day during the summer operating period, or approximately $1,000,000/year. That is a sufficiently high incentive for the planning and scheduling departments to investigate this issue.

It will be understood by those skilled in the art that the invention is not limited to the embodiment described here and can be applied to any process which is scheduled using a single-period or multi-period planning model and is controlled by multivariable constraint controls.

The systems and methods disclosed herein are presented only by way of example and are not meant to limit the scope of the subject matter described herein. Other variations of the systems and methods described above will be apparent to those skilled in the art and as such are considered to be within the scope of the subject matter described herein. For example, it should be understood that steps and the order of the steps in the processing described herein may be altered, modified and/or augmented and still achieve the desired outcome. Throughout the specification, terms such as “may” and “can” are used interchangeably and use of any particular term should not be construed as limiting the scope or requiring experimentation to implement the claimed subject matter or embodiments described herein.

The systems' and methods' data may be stored in one or more data stores. The data stores can be of many different types of storage devices and programming constructs, such as RAM, ROM, flash memory, programming data structures, programming variables, etc. It is noted that data structures describe formats for use in organizing and storing data in databases, programs, memory, or other computer-readable media for use by a computer program.

Code adapted to provide the systems and methods described above may be provided on many different types of computer-readable media including computer storage mechanisms (e.g., CD-ROM, diskette, RAM, flash memory, computer's hard drive, etc.) that contain instructions for use in execution by a processor to perform the methods' operations and implement the systems described herein.

The computer components, software modules, functions and data structures described herein may be connected directly or indirectly to each other in order to allow the flow of data needed for their operations. Various functional units described herein have been expressly or implicitly described as modules and agents, in order to more particularly emphasize their independent implementation and operation. It is also noted that an agent, module or processor includes but is not limited to a unit of code that performs a software operation, and can be implemented for example as a subroutine unit of code, or as a software function unit of code, or as an object (as in an object-oriented paradigm), or as an applet, or in a computer script language, or as another type of computer code. The various functional units may be implemented in hardware circuits comprising custom VLSI circuits or gate arrays; field-programmable gate arrays; programmable array logic; programmable logic devices; commercially available logic chips, transistors, and other such components. Modules implemented as software for execution by a processor or processors may comprise one or more physical or logical blocks of code that may be organized as one or more of objects, procedures, or functions. The modules need not be physically located together, but may comprise code stored in different locations, such as over several memory devices, capable of being logically joined for execution. Modules may also be implemented as combinations of software and hardware, such as a processor operating on a set of operational data or instructions.

A portion of the disclosure of this patent document contains material which is or may be subject to one or more of copyright, design patent, industrial design, or unregistered design protection. The rightsholder has no objection to the reproduction of any such material as portrayed herein through facsimile reproduction of the patent document or patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all rights whatsoever. 

1. A method, comprising: obtaining at least one production value for each process unit of a set of process units; obtaining a price and scheduled target for each process unit of the set of process units; calculating at least one differential profit value for the set of process units, the differential profit value comprising a difference between profit based on the price and the scheduled target obtained for each process unit, and profit based on the price and production value for each process unit; and identifying, from the at least one differential profit value, at least one mismatch between operation of at least one process unit of the set of process units and the scheduled target for the same at least one process unit.
 2. The method of claim 1, wherein the set of process units comprises at least one process unit in a selected refinery subprocess or circuit.
 3. The method of claim 1, wherein the set of process units comprises a plurality of process units in a refinery.
 4. The method of claim 1, further comprising testing each production value for validity according to specified limits prior to calculating the differential profit value.
 5. The method of claim 4, further comprising testing each production value to determine if the associated process unit is operating in a steady state.
 6. The method of claim 1, wherein calculating the at least one differential profit value comprises calculating a differential profit value for each individual process unit of the set of process units, the differential profit value for the individual process unit comprising a difference between profit based on the scheduled price and the scheduled target obtained for the process unit and the profit based on the production value for the same process unit.
 7. The method of claim 6, wherein obtaining the at least one production value, obtaining the price and scheduled target for each of the at least one process unit, and calculating the at least one differential profit value are carried out periodically to provide a historical set of differential profit values, and identifying the at least one mismatch comprises identifying the at least one mismatch from the historical set of differential profit values.
 8. The method of claim 1, further comprising displaying at least a subset of the historical set of differential profit values.
 9. The method of claim 1, wherein identifying the at least one mismatch comprises determining that one or more of the at least one differential profit value exceeds a corresponding limit.
 10. The method of claim 1, wherein each scheduled target for each process unit of the set of process units is associated with at least one scheduled constraint, and operation of each process unit of the set of process units is associated with at least one operational constraint, the method further comprising, for the at least one process unit for which a mismatch was identified: altering one or more of the at least one scheduled constraint associated with the at least one process unit; or altering one or more of the at least one operational constraint associated with the at least one process unit.
 11. The method of claim 10, wherein the at least one scheduled constraint or the at least one operational constraint comprises one or more of a quality target, boiling points, percent content, octane number, stream temperature, reactor temperature, production stream volume, and production stream quality.
 12. A system for implementation in a plant comprising a plurality of process units, the system comprising: a differential profit calculation module configured to calculate at least one differential profit value for a set of process units of the plurality of process units, the differential profit value comprising a difference between profit based on a price and a scheduled target obtained for each process unit of the set of process units, and profit based on a price and a production value for each said process unit; and a rationalization module configured to identify at least one mismatch between operation of at least one process unit of the set of process units and the scheduled target for the same at least one process unit from the at least one differential profit value.
 13. The system of claim 12, wherein the set of process units comprises at least one process unit in a selected subprocess or circuit of the plant.
 14. The system of claim 12, wherein the set of process units comprises a plurality of process units in a refinery.
 15. The system of claim 12, wherein the differential profit calculation module is configured to calculate the at least one differential profit value by calculating a differential profit value for each individual process unit of the set of process units, the differential profit value for the individual process unit comprising a difference between profit based on the scheduled price and the scheduled target obtained for the process unit and the profit based on the production value for the same process unit.
 16. The system of claim 15, wherein the differential profit calculation module carries out the calculating of the at least one differential profit value periodically to provide a historical set of differential profit values, the production value, price and scheduled target for each said process unit being obtained periodically, such that the at least one mismatch is identifiable from the historical set of differential profit values.
 17. The system of claim 16, further comprising a display unit for displaying at least a subset of the historical set of differential profit values.
 18. The system of claim 12, wherein the at least one mismatch is identified by determining that one or more of the at least one differential profit value exceeds a corresponding limit.
 19. A non-transitory computer-readable medium bearing code which, when executed by one or more processors of a computing system, causes the system to implement the method of: obtaining at least one production value for each process unit of a set of process units; obtaining a price and scheduled target for each process unit of the set of process units; calculating at least one differential profit value for the set of process units, the differential profit value comprising a difference between profit based on the price and the scheduled target obtained for each process unit, and profit based on the price and production value for each process unit; and identifying, from the at least one differential profit value, at least one mismatch between operation of at least one process unit of the set of process units and the scheduled target for the same at least one process unit.
 20. The computer-readable medium of claim 19, wherein obtaining the at least one production value, obtaining the price and scheduled target for each of the at least one process unit, and calculating the at least one differential profit value are carried out periodically to provide a historical set of differential profit values, and identifying the at least one mismatch comprises identifying the at least one mismatch from the historical set of differential profit values. 